package org.study.temp;

import java.util.Random;

/**
 * 参考 https://mp.weixin.qq.com/s/NGzTUvob4AeNn7TvHD5tAA
 *
 * @author doveylovey
 * @version v1.0.0
 * @email 1135782208@qq.com
 * @date 2022年06月11日
 */
public class HelloTests {
    public static void main(String[] args) {
        randomStringTest(-229985452);
        System.out.println("------------");
        randomStringTest(-229985452);

        // System.out.println(randomString(-229985452) + " " + randomString(-147909649));
    }

    public static String randomString(int i) {
        Random ran = new Random(i);
        StringBuilder sb = new StringBuilder();
        while (true) {
            int k = ran.nextInt(27);
            if (k == 0) {
                break;
            }
            sb.append((char) ('`' + k));
        }
        return sb.toString();
    }

    private static void randomStringTest(int i) {
        Random ran = new Random(i);
        System.out.println(ran.nextInt());
        System.out.println(ran.nextInt());
        System.out.println(ran.nextInt());
        System.out.println(ran.nextInt());
        System.out.println(ran.nextInt());
    }
}
